package com.ruoyi.ncpsy.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ncpsy.mapper.NcpsyWareInfoMapper;
import com.ruoyi.ncpsy.domain.NcpsyWareInfo;
import com.ruoyi.ncpsy.service.INcpsyWareInfoService;

/**
 * 仓储信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-13
 */
@Service
public class NcpsyWareInfoServiceImpl implements INcpsyWareInfoService 
{
    @Autowired
    private NcpsyWareInfoMapper ncpsyWareInfoMapper;

    /**
     * 查询仓储信息
     * 
     * @param wareId 仓储信息主键
     * @return 仓储信息
     */
    @Override
    public NcpsyWareInfo selectNcpsyWareInfoByWareId(Long wareId)
    {
        return ncpsyWareInfoMapper.selectNcpsyWareInfoByWareId(wareId);
    }

    /**
     * 查询仓储信息列表
     * 
     * @param ncpsyWareInfo 仓储信息
     * @return 仓储信息
     */
    @Override
    public List<NcpsyWareInfo> selectNcpsyWareInfoList(NcpsyWareInfo ncpsyWareInfo)
    {
        return ncpsyWareInfoMapper.selectNcpsyWareInfoList(ncpsyWareInfo);
    }

    /**
     * 新增仓储信息
     * 
     * @param ncpsyWareInfo 仓储信息
     * @return 结果
     */
    @Override
    public int insertNcpsyWareInfo(NcpsyWareInfo ncpsyWareInfo)
    {
        return ncpsyWareInfoMapper.insertNcpsyWareInfo(ncpsyWareInfo);
    }

    /**
     * 修改仓储信息
     * 
     * @param ncpsyWareInfo 仓储信息
     * @return 结果
     */
    @Override
    public int updateNcpsyWareInfo(NcpsyWareInfo ncpsyWareInfo)
    {
        ncpsyWareInfo.setUpdateTime(DateUtils.getNowDate());
        return ncpsyWareInfoMapper.updateNcpsyWareInfo(ncpsyWareInfo);
    }

    /**
     * 批量删除仓储信息
     * 
     * @param wareIds 需要删除的仓储信息主键
     * @return 结果
     */
    @Override
    public int deleteNcpsyWareInfoByWareIds(Long[] wareIds)
    {
        return ncpsyWareInfoMapper.deleteNcpsyWareInfoByWareIds(wareIds);
    }

    /**
     * 删除仓储信息信息
     * 
     * @param wareId 仓储信息主键
     * @return 结果
     */
    @Override
    public int deleteNcpsyWareInfoByWareId(Long wareId)
    {
        return ncpsyWareInfoMapper.deleteNcpsyWareInfoByWareId(wareId);
    }
}
